import request from '@/utils/request'

export function getListPage(params,page) {
    return request({
        url: '/ids/pub/agency/agencyList',
        headers: {
        'Content-Type': 'application/json;charset=UTF-8',
        'page-num': page.pageNum,
        'page-size': page.pageSize
        },
        method: 'post',  
        data:params
    })
}
export function addMechanism(data) {
    return request({
      url: '/ids/pub/agency/save',
      headers: {
        'Content-Type': 'application/json;charset=UTF-8'
      },
      method: 'post',
      data
    })
}
export function updateMechanism(data) {
    return request({
      url: '/ids/pub/agency/update',
      headers: {
        'Content-Type': 'application/json;charset=UTF-8'
      },
      method: 'post',
      data
    })
}

export function delData(id) {
  return request({
    url: '/ids/pub/agency/deleteAgency/'+id,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    method: 'GET',
  })
}
export function getDetailsList(params,page) {
  return request({
      url: '/ids/agencyPerson/findSaleAgencyByIds/'+params.agencyId+'/'+params.userType,
      headers: {
      'Content-Type': 'application/json;charset=UTF-8',
      'page-num': page.pageNum,
      'page-size': page.pageSize
      },
      method: 'get', 
  })
}